/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// pmlmsgwin.hpp - Multiline popup message window class definition.
//
// Author: Jim DeLisle
//
// Copyright (c) 1997-2002 Swell Software
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef _PEGMLMSGWIN_
#define _PEGMLMSGWIN_

/*--------------------------------------------------------------------------*/

class PegMLMessageWindow : public PegWindow
{
    public:

        PegMLMessageWindow(const PEGCHAR *pTitle,
                           const PEGCHAR *pMessage,
                           PEGULONG Style = MW_OK|FF_RAISED,
                           PEGINT Icon = 0, PegThing *pOwner = NULL);

        PegMLMessageWindow(const PegRect &Rect, PEGUINT TitleStringId,
                           PEGUINT MessageId = 0,
                           PEGULONG Style = MW_OK|FF_RAISED,
                           PEGINT Icon = 0, PegThing *pOwner = NULL);

        PegMLMessageWindow(PEGUINT TitleStringId,
                           PEGUINT MessageId = 0,
                           PEGULONG Style = MW_OK|FF_RAISED,
                           PEGINT Icon = 0, PegThing *pOwner = NULL);


        virtual ~PegMLMessageWindow();

        virtual void Draw(const PegRect &Invalid);
        PegTextBox *GetTextBox(void) {return mpTextBox;}
        virtual PEGINT Message(const PegMessage& Mesg);


    protected:
        void AddButtons();
        void AddTextBox(PEGINT MessageId);
        void AddTextBox(const PEGCHAR *pMessage);
        void CalcButtonTop();
        void CalcButtonWidth();

        PegTitle *mpTitle;
        PegThing *mpOwner;
        PEGINT mIcon;
        PegTextBox* mpTextBox;
        PEGINT mButtonWidth;
        PEGINT mButtonTop;
        PEGINT mOneButtonWidth;
};

#endif  // _PEGMLMSGWIN_


